package com.ruoyi.web.core.utils;

import lombok.Getter;

@Getter
public enum QrCodeEnum  implements CodeEnum{
    /**
     * "二维码编号枚举 "
     */

    ONE(1, "image/resize,w_200,h_200/auto-orient,1/quality,q_90/format,jpg/watermark,type_d3F5LXplbmhlaQ,size_30,text_MDE,color_FFFFFF,t_90,g_south,y_10"),
    TWO(2, "image/resize,w_200,h_200/auto-orient,1/quality,q_90/format,jpg/watermark,type_d3F5LXplbmhlaQ,size_30,text_MDI,color_FFFFFF,t_90,g_south,y_10"),
    THREE(3, "image/resize,w_200,h_200/auto-orient,1/quality,q_90/format,jpg/watermark,type_d3F5LXplbmhlaQ,size_30,text_MDM,color_FFFFFF,t_90,g_south,y_10"),
    ;

    private final Integer code;
    private final String msg;

    QrCodeEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public static String getMsgByCode(int code) {
        QrCodeEnum[] enumConstants = QrCodeEnum.class.getEnumConstants();
        for (QrCodeEnum enumConstant : enumConstants) {
            if (code==enumConstant.getCode()) {
                return enumConstant.getMsg();
            }
        }
        return code + "所对应的枚举不存在!";
    }

}
